/*
 * @Author:gxx
 * @Date: 2021-03-29 11:36:35
 * @Last Modified by: gxx
 * @Last Modified time: 2021-03-29 11:36:35
 * @Description:  算法竞赛经典入门　３－３　回文词　
*/
#include <iostream>
#include <string>
using namespace std;

const char Character[22] = "AEHIJLMOSTUVWXYZ12358";
const char Reverse[22] =     "A3HILJMO2TUVWXY51SEZ8";

string resrt(string ss)
{
    string res;
    int len = ss.length();
    for (int i = 0; i < len; i++)
    {
        res += ss[len - i - 1];
    }
    return res;
}

bool is_huiwen(string ss)
{
    string res = resrt(ss);
    // cout <<"res : "<<res<<endl;
    // cout <<" ss : "<< ss <<endl;
    if (res == ss)
        return true;
    else
        return false;
}

bool is_jingxiang(string ss)
{
    
    int len = ss.length();
    // cout << "ss.length() : " << ss.length() << endl;
    if (len <= 0)
        return -1;
    string a_up;
    string b_low;
    if (len % 2 == 0)
    {
        // cout << "2n !" << endl;
        for (int i = len / 2; i < len; i++)
        {
            b_low += ss[i];
        }
        for (int i = 0; i < len / 2; i++)
        {
            for (int j = 0; j < 22; j++)
            {
                if (ss[i] == Character[j])
                    ss[i] = Reverse[j];
            }
            a_up += ss[i];
        }
         b_low = resrt(b_low);
        // cout << " a_up : " << a_up << endl;
        // cout << " b_low : " << b_low << endl;
        if (b_low == a_up)
        {
            // cout << " ls_jingxiang_2n   :  "
            //      << "b_low : " << b_low << "  a_up  :   " << a_up << endl;
            return true;
        }
        else
            return false;
    }
    else
    {
        string a_up;
        string b_low;
        int n = 0;
        for (int i = 0; i < len; i++)
        {
            for (int j = 0; j < 22; j++)
            {
                if (ss[i] == Character[j])
                    n++;
            }
        }
        if (n)
        {
            for (int i = (len - 1) / 2 +1; i < len; i++)
            {
                b_low += ss[i];
            }
            for (int i = 0; i < (len - 1) / 2; i++)
            {
                for (int j = 0; j < 22; j++)
                {
                    if (ss[i] == Character[j])
                        ss[i] = Reverse[j];
                }
                a_up += ss[i];
            }
                b_low = resrt(b_low);
                // cout << " a_up : " << a_up << endl;
                // cout << " b_low : " << b_low << endl;
            if (b_low == a_up)
            {
                // cout << " ls_jingxiang_2n-1   :  "
                //      << "b_low : " << b_low << "  a_up  :   " << a_up << endl;
                return true;
            }
            else
                return false;
        }
    }
}

int main(int argc, char **argv)
{
    string str_in;
    while (getline(cin, str_in))
    {
        bool ls_h = is_huiwen(str_in);
        // cout << "is_huiwen : " << ls_h << endl;
        bool ls_j = is_jingxiang(str_in);
        // cout << "is_jingxiang : " << ls_j << endl;
        if (ls_h && ls_j)
            cout << str_in << " -- is a mirrored palindrome." << endl;
        else if (ls_h && !ls_j)
            cout << str_in << " -- is a regular palindrome." << endl;
        else if (!ls_h && ls_j)
            cout << str_in << " -- is a mirrored string." << endl;
        else if (!ls_h && !ls_j)
            cout << str_in << " -- is not a palindrome." << endl;
    }
    return 0;
}